package com.af.monitorModule.generator.mapper;

import com.af.monitorModule.generator.entity.Company;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lyz_4dou
 * @since 2021-02-23
 */
@Component
public interface CompanyMapper extends BaseMapper<Company> {

    Integer stopBatch(String ids);

    @Select("select a.company_name,b.dd_qr_code from company a left join monitoring_group b on a.id = b.company_id where a.state = 1 order by CONVERT( a.company_name USING gbk ) COLLATE gbk_chinese_ci ASC")
    List<JSONObject> getAllComRQCode();

}
